home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 280_01 / test.m4 < prev    next >
INI File  |  1989-01-11  |  896b  |  41 lines

  1. [TEST.M4 of JUGPDS Vol.18]
  2.  
  3. define(proc,[integer function $1$2 define(procname,$1)])
  4. define(return,[{procname = $1; [return]}])
  5.  
  6. define(str,[ifelse($2,",,data $1(incr($3))/[LET]substr($2,1,1)/
  7. [str($1,substr($2,2),incr($3))])])
  8.  
  9. define(string,[integer $1(len(substr($2,2)))
  10. str($1,substr($2,2),0)data $1(len(substr($2,2)))/EOS/])
  11.  
  12.  
  13. proc(equal,(str1,str2))
  14.  
  15. len(abc)
  16. len("abc")
  17. substr(abcdefg,2)
  18. string(name,"text")
  19. str(a,abc",0)
  20. return(YES)
  21. define(N,7)
  22. arith(N,+,3)
  23. arith(N,-,3)
  24. arith(N,*,3)
  25. arith(N,/,3)
  26. arith(N,%,3)
  27. arith(N,<,3)
  28. arith(N,>,3)
  29. arith(N,<=,3)
  30. arith(N,>=,3)
  31. arith(N,=<,3)
  32. arith(N,=>,3)
  33. arith(N,<<,3)
  34. arith(N,>>,3)
  35. arith(N,><,3)
  36. arith(N,<>,3)
  37. <,3)
  38. arith(N,>>,3)
  39. arith(N,><,3)
  40. arith(N,<>,3)
  41.